import request from '@/utils/request'

export default {
  getList: function (params) {
    return request({
      url: '/shop/categoryFirst/list',
      method: 'get',
      params
    })
  },
  apiAdd: function (params) {
    return request({
      url: '/shop/categoryFirst',
      method: 'POST',
      data: {
        name: params.name,
        flag: params.flag
      }
    })
  },
  apiUpdate: function (params) {
    return request({
      url: '/shop/categoryFirst',
      method: 'POST',
      data: {
        id: params.id,
        name: params.name,
        flag: params.flag
      }
    })
  },

}

